<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupCookieJar</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch03.html" title="Additional Features">
<link rel="prev" href="SoupContentSniffer.html" title="SoupContentSniffer">
<link rel="next" href="SoupCookieJarText.html" title="SoupCookieJarText">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="SoupContentSniffer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupCookieJarText.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupCookieJar.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupCookieJar.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupCookieJar.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#SoupCookieJar.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#SoupCookieJar.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#SoupCookieJar.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupCookieJar"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupCookieJar.top_of_page"></a>SoupCookieJar</span></h2>
<p>SoupCookieJar — Automatic cookie handling for <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a></p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupCookieJar.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupCookieJar.html#SoupCookieJar-struct" title="SoupCookieJar">SoupCookieJar</a>;
<a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="returnvalue">SoupCookieJar</span></a> *     <a class="link" href="SoupCookieJar.html#soup-cookie-jar-new" title="soup_cookie_jar_new ()">soup_cookie_jar_new</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">char</span> *              <a class="link" href="SoupCookieJar.html#soup-cookie-jar-get-cookies" title="soup_cookie_jar_get_cookies ()">soup_cookie_jar_get_cookies</a>         (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> for_http</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            <a class="link" href="SoupCookieJar.html#soup-cookie-jar-get-cookie-list" title="soup_cookie_jar_get_cookie_list ()">soup_cookie_jar_get_cookie_list</a>     (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> for_http</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-set-cookie" title="soup_cookie_jar_set_cookie ()">soup_cookie_jar_set_cookie</a>          (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *cookie</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-set-cookie-with-first-party" title="soup_cookie_jar_set_cookie_with_first_party ()">soup_cookie_jar_set_cookie_with_first_party</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *first_party</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *cookie</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-add-cookie" title="soup_cookie_jar_add_cookie ()">soup_cookie_jar_add_cookie</a>          (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-add-cookie-with-first-party" title="soup_cookie_jar_add_cookie_with_first_party ()">soup_cookie_jar_add_cookie_with_first_party</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *first_party</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-delete-cookie" title="soup_cookie_jar_delete_cookie ()">soup_cookie_jar_delete_cookie</a>       (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            <a class="link" href="SoupCookieJar.html#soup-cookie-jar-all-cookies" title="soup_cookie_jar_all_cookies ()">soup_cookie_jar_all_cookies</a>         (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);

enum                <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy">SoupCookieJarAcceptPolicy</a>;
<a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="returnvalue">SoupCookieJarAcceptPolicy</span></a> <a class="link" href="SoupCookieJar.html#soup-cookie-jar-get-accept-policy" title="soup_cookie_jar_get_accept_policy ()">soup_cookie_jar_get_accept_policy</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupCookieJar.html#soup-cookie-jar-set-accept-policy" title="soup_cookie_jar_set_accept_policy ()">soup_cookie_jar_set_accept_policy</a>   (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a> policy</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupCookieJar.html#soup-cookie-jar-is-persistent" title="soup_cookie_jar_is_persistent ()">soup_cookie_jar_is_persistent</a>       (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);

#define             <a class="link" href="SoupCookieJar.html#SOUP-COOKIE-JAR-READ-ONLY:CAPS" title="SOUP_COOKIE_JAR_READ_ONLY">SOUP_COOKIE_JAR_READ_ONLY</a>
#define             <a class="link" href="SoupCookieJar.html#SOUP-COOKIE-JAR-ACCEPT-POLICY:CAPS" title="SOUP_COOKIE_JAR_ACCEPT_POLICY">SOUP_COOKIE_JAR_ACCEPT_POLICY</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupCookieJar.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----SoupCookieJar
         +----<a class="link" href="SoupCookieJarSqlite.html" title="SoupCookieJarSqlite">SoupCookieJarSqlite</a>
         +----<a class="link" href="SoupCookieJarText.html" title="SoupCookieJarText">SoupCookieJarText</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupCookieJar.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
SoupCookieJar implements
 <a class="link" href="SoupSessionFeature.html" title="SoupSessionFeature">SoupSessionFeature</a>.</p>
</div>
<div class="refsect1">
<a name="SoupCookieJar.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="SoupCookieJar.html#SoupCookieJar--accept-policy" title='The "accept-policy" property'>accept-policy</a>"            <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a>  : Read / Write
  "<a class="link" href="SoupCookieJar.html#SoupCookieJar--read-only" title='The "read-only" property'>read-only</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="SoupCookieJar.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="SoupCookieJar.html#SoupCookieJar-changed" title='The "changed" signal'>changed</a>"                                        : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="SoupCookieJar.description"></a><h2>Description</h2>
<p>
A <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> stores <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>s and arrange for them
to be sent with the appropriate <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>s.
<a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> implements <a class="link" href="SoupSessionFeature.html" title="SoupSessionFeature"><span class="type">SoupSessionFeature</span></a>, so you can add a
cookie jar to a session with <a class="link" href="SoupSession.html#soup-session-add-feature" title="soup_session_add_feature ()"><code class="function">soup_session_add_feature()</code></a> or
<a class="link" href="SoupSession.html#soup-session-add-feature-by-type" title="soup_session_add_feature_by_type ()"><code class="function">soup_session_add_feature_by_type()</code></a>.
</p>
<p>
Note that the base <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> class does not support any form
of long-term cookie persistence.
</p>
</div>
<div class="refsect1">
<a name="SoupCookieJar.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupCookieJar-struct"></a><h3>SoupCookieJar</h3>
<pre class="programlisting">typedef struct _SoupCookieJar SoupCookieJar;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-new"></a><h3>soup_cookie_jar_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="returnvalue">SoupCookieJar</span></a> *     soup_cookie_jar_new                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>. The base <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> class does
not support persistent storage of cookies; use a subclass for that.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-get-cookies"></a><h3>soup_cookie_jar_get_cookies ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *              soup_cookie_jar_get_cookies         (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> for_http</code></em>);</pre>
<p>
Retrieves (in Cookie-header form) the list of cookies that would
be sent with a request to <em class="parameter"><code>uri</code></em>.
</p>
<p>
If <em class="parameter"><code>for_http</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the return value will include cookies marked
"HttpOnly" (that is, cookies that the server wishes to keep hidden
from client-side scripting operations such as the JavaScript
document.cookies property). Since <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> sets the Cookie
header itself when making the actual HTTP request, you should
almost certainly be setting <em class="parameter"><code>for_http</code></em> to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are calling
this.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>for_http</code></em> :</span></p></td>
<td>whether or not the return value is being passed directly
to an HTTP operation</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the cookies, in string form, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there are no
cookies for <em class="parameter"><code>uri</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-get-cookie-list"></a><h3>soup_cookie_jar_get_cookie_list ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            soup_cookie_jar_get_cookie_list     (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> for_http</code></em>);</pre>
<p>
Retrieves the list of cookies that would be sent with a request to <em class="parameter"><code>uri</code></em>
as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> objects.
</p>
<p>
If <em class="parameter"><code>for_http</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the return value will include cookies marked
"HttpOnly" (that is, cookies that the server wishes to keep hidden
from client-side scripting operations such as the JavaScript
document.cookies property). Since <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> sets the Cookie
header itself when making the actual HTTP request, you should
almost certainly be setting <em class="parameter"><code>for_http</code></em> to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are calling
this.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>a <a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>for_http</code></em> :</span></p></td>
<td>whether or not the return value is being passed directly
to an HTTP operation</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
with the cookies in the <em class="parameter"><code>jar</code></em> that would be sent with a request to <em class="parameter"><code>uri</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Soup.Cookie]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.40</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-set-cookie"></a><h3>soup_cookie_jar_set_cookie ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_set_cookie          (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *cookie</code></em>);</pre>
<p>
Adds <em class="parameter"><code>cookie</code></em> to <em class="parameter"><code>jar</code></em>, exactly as though it had appeared in a
Set-Cookie header returned from a request to <em class="parameter"><code>uri</code></em>.
</p>
<p>
Keep in mind that if the <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a>
<a class="link" href="SoupCookieJar.html#SOUP-COOKIE-JAR-ACCEPT-NO-THIRD-PARTY:CAPS"><code class="literal">SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY</code></a> is set you'll need to use
<a class="link" href="SoupCookieJar.html#soup-cookie-jar-set-cookie-with-first-party" title="soup_cookie_jar_set_cookie_with_first_party ()"><code class="function">soup_cookie_jar_set_cookie_with_first_party()</code></a>, otherwise the jar
will have no way of knowing if the cookie is being set by a third
party or not.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>the URI setting the cookie</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
<td>the stringified cookie to set</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-set-cookie-with-first-party"></a><h3>soup_cookie_jar_set_cookie_with_first_party ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_set_cookie_with_first_party
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *uri</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *first_party</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *cookie</code></em>);</pre>
<p>
Adds <em class="parameter"><code>cookie</code></em> to <em class="parameter"><code>jar</code></em>, exactly as though it had appeared in a
Set-Cookie header returned from a request to <em class="parameter"><code>uri</code></em>. <em class="parameter"><code>first_party</code></em>
will be used to reject cookies coming from third party resources in
case such a security policy is set in the <em class="parameter"><code>jar</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
<td>the URI setting the cookie</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_party</code></em> :</span></p></td>
<td>the URI for the main document</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
<td>the stringified cookie to set</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-add-cookie"></a><h3>soup_cookie_jar_add_cookie ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_add_cookie          (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);</pre>
<p>
Adds <em class="parameter"><code>cookie</code></em> to <em class="parameter"><code>jar</code></em>, emitting the 'changed' signal if we are modifying
an existing cookie or adding a valid new cookie ('valid' means
that the cookie's expire date is not in the past).
</p>
<p>
<em class="parameter"><code>cookie</code></em> will be 'stolen' by the jar, so don't free it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-add-cookie-with-first-party"></a><h3>soup_cookie_jar_add_cookie_with_first_party ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_add_cookie_with_first_party
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> *first_party</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);</pre>
<p>
Adds <em class="parameter"><code>cookie</code></em> to <em class="parameter"><code>jar</code></em>, emitting the 'changed' signal if we are modifying
an existing cookie or adding a valid new cookie ('valid' means
that the cookie's expire date is not in the past).
</p>
<p>
<em class="parameter"><code>first_party</code></em> will be used to reject cookies coming from third party
resources in case such a security policy is set in the <em class="parameter"><code>jar</code></em>.
</p>
<p>
<em class="parameter"><code>cookie</code></em> will be 'stolen' by the jar, so don't free it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_party</code></em> :</span></p></td>
<td>the URI for the main document</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.40</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-delete-cookie"></a><h3>soup_cookie_jar_delete_cookie ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_delete_cookie       (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> *cookie</code></em>);</pre>
<p>
Deletes <em class="parameter"><code>cookie</code></em> from <em class="parameter"><code>jar</code></em>, emitting the 'changed' signal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-all-cookies"></a><h3>soup_cookie_jar_all_cookies ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            soup_cookie_jar_all_cookies         (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);</pre>
<p>
Constructs a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> with every cookie inside the <em class="parameter"><code>jar</code></em>.
The cookies in the list are a copy of the original, so
you have to free them when you are done with them.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
with all the cookies in the <em class="parameter"><code>jar</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Soup.Cookie]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupCookieJarAcceptPolicy"></a><h3>enum SoupCookieJarAcceptPolicy</h3>
<pre class="programlisting">typedef enum {
	SOUP_COOKIE_JAR_ACCEPT_ALWAYS,
	SOUP_COOKIE_JAR_ACCEPT_NEVER,
	SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY
} SoupCookieJarAcceptPolicy;
</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-COOKIE-JAR-ACCEPT-ALWAYS:CAPS"></a><span class="term"><code class="literal">SOUP_COOKIE_JAR_ACCEPT_ALWAYS</code></span></p></td>
<td>accept all cookies unconditionally.
</td>
</tr>
<tr>
<td><p><a name="SOUP-COOKIE-JAR-ACCEPT-NEVER:CAPS"></a><span class="term"><code class="literal">SOUP_COOKIE_JAR_ACCEPT_NEVER</code></span></p></td>
<td>reject all cookies unconditionally.
</td>
</tr>
<tr>
<td><p><a name="SOUP-COOKIE-JAR-ACCEPT-NO-THIRD-PARTY:CAPS"></a><span class="term"><code class="literal">SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY</code></span></p></td>
<td>accept all cookies set by
the main document loaded in the application using libsoup. An
example of the most common case, web browsers, would be: If
http://www.example.com is the page loaded, accept all cookies set
by example.com, but if a resource from http://www.third-party.com
is loaded from that page reject any cookie that it could try to
set. For libsoup to be able to tell apart first party cookies from
the rest, the application must call <a class="link" href="SoupMessage.html#soup-message-set-first-party" title="soup_message_set_first_party ()"><code class="function">soup_message_set_first_party()</code></a>
on each outgoing <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>, setting the <a class="link" href="SoupURI.html" title="SoupURI"><span class="type">SoupURI</span></a> of the main
document. If no first party is set in a message when this policy is
in effect, cookies will be assumed to be third party by default.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-get-accept-policy"></a><h3>soup_cookie_jar_get_accept_policy ()</h3>
<pre class="programlisting"><a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="returnvalue">SoupCookieJarAcceptPolicy</span></a> soup_cookie_jar_get_accept_policy
                                                        (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);</pre>
<p>
Gets <em class="parameter"><code>jar</code></em>'s <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a> set in the <em class="parameter"><code>jar</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-set-accept-policy"></a><h3>soup_cookie_jar_set_accept_policy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_cookie_jar_set_accept_policy   (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a> policy</code></em>);</pre>
<p>
Sets <em class="parameter"><code>policy</code></em> as the cookie acceptance policy for <em class="parameter"><code>jar</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>policy</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-cookie-jar-is-persistent"></a><h3>soup_cookie_jar_is_persistent ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_cookie_jar_is_persistent       (<em class="parameter"><code><a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar</code></em>);</pre>
<p>
Gets whether <em class="parameter"><code>jar</code></em> stores cookies persistenly.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>a <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>jar</code></em> storage is persistent or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.40</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-COOKIE-JAR-READ-ONLY:CAPS"></a><h3>SOUP_COOKIE_JAR_READ_ONLY</h3>
<pre class="programlisting">#define SOUP_COOKIE_JAR_READ_ONLY "read-only"
</pre>
<p>
Alias for the <a class="link" href="SoupCookieJar.html#SoupCookieJar--read-only" title='The "read-only" property'><span class="type">"read-only"</span></a> property. (Whether
or not the cookie jar is read-only.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-COOKIE-JAR-ACCEPT-POLICY:CAPS"></a><h3>SOUP_COOKIE_JAR_ACCEPT_POLICY</h3>
<pre class="programlisting">#define SOUP_COOKIE_JAR_ACCEPT_POLICY "accept-policy"
</pre>
<p>
Alias for the <a class="link" href="SoupCookieJar.html#SoupCookieJar--accept-policy" title='The "accept-policy" property'><span class="type">"accept-policy"</span></a> property.
</p>
<p class="since">Since 2.30</p>
</div>
</div>
<div class="refsect1">
<a name="SoupCookieJar.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupCookieJar--accept-policy"></a><h3>The <code class="literal">"accept-policy"</code> property</h3>
<pre class="programlisting">  "accept-policy"            <a class="link" href="SoupCookieJar.html#SoupCookieJarAcceptPolicy" title="enum SoupCookieJarAcceptPolicy"><span class="type">SoupCookieJarAcceptPolicy</span></a>  : Read / Write</pre>
<p>
The policy the jar should follow to accept or reject cookies
</p>
<p>Default value: SOUP_COOKIE_JAR_ACCEPT_ALWAYS</p>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupCookieJar--read-only"></a><h3>The <code class="literal">"read-only"</code> property</h3>
<pre class="programlisting">  "read-only"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>Whether or not the cookie jar is read-only.</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="SoupCookieJar.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="SoupCookieJar-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a> *jar,
                                                        <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>    *old_cookie,
                                                        <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a>    *new_cookie,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       user_data)       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when <em class="parameter"><code>jar</code></em> changes. If a cookie has been added,
<em class="parameter"><code>new_cookie</code></em> will contain the newly-added cookie and
<em class="parameter"><code>old_cookie</code></em> will be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If a cookie has been deleted,
<em class="parameter"><code>old_cookie</code></em> will contain the to-be-deleted cookie and
<em class="parameter"><code>new_cookie</code></em> will be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If a cookie has been changed,
<em class="parameter"><code>old_cookie</code></em> will contain its old value, and <em class="parameter"><code>new_cookie</code></em> its
new value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>jar</code></em> :</span></p></td>
<td>the <a class="link" href="SoupCookieJar.html" title="SoupCookieJar"><span class="type">SoupCookieJar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>old_cookie</code></em> :</span></p></td>
<td>the old <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_cookie</code></em> :</span></p></td>
<td>the new <a class="link" href="SoupCookie.html" title="SoupCookie"><span class="type">SoupCookie</span></a> value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>